<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    public function article(){
        return $this->belongsTo('App\Article');
    }
    public function user(){
        return $this->belongsTo('App\User');
    }
    public function replys(){
        return $this->hasMany('App\CommentReply')->orderBy('created_at','desc')->limit(2);
    }
}
